
import {bannerlist} from '../../../request/api'
const state = {
    bannerList:[]
}

const getters ={
    getBanner(state){
        return state.bannerList
    }
}

const mutations ={
    CHANGEBANNER(state,payload){
        state.bannerList=payload
    }
}

const actions ={
    GetBannerInfo(context){
        bannerlist()
        .then(res=>{
            if(res.code==200){
                console.log(res);
                context.commit('CHANGEBANNER',res.list)
            }
        })
    }
}

export default{
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}